﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RFMobile
{
    public partial class registerScreen : Form
    {
        public registerScreen()
        {
            InitializeComponent();
            
            this.ShowDialog();
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                newResponsibleScreen newResponsible = new newResponsibleScreen();
            }
            radioButton1.Checked = false;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked)
            {
                newMachineScreen newMachine = new newMachineScreen();
            }
            radioButton2.Checked = false;
        }

        private void menuItem2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void menuItem3_Click(object sender, EventArgs e)
        {
            this.radioButton1_CheckedChanged(sender, e);
        }


        private void menuItem4_Click(object sender, EventArgs e)
        {
            this.radioButton2_CheckedChanged(sender, e);
        }

        private void registerScreen_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.KeyCode == System.Windows.Forms.Keys.Up))
            {
                // Up
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Down))
            {
                // Down
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Left))
            {
                // Left
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Right))
            {
                // Right
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
            {
                // Enter
            }

            if (e.KeyCode.ToString().ToUpper() == "E")
            {
                radioButton1.Checked = true;
            }

            if (e.KeyCode.ToString().ToUpper() == "M")
            {
                radioButton1.Checked = true;
            }
        }

        private void menuItem7_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void menuItem8_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void menuItem6_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void menuItem4_Click_1(object sender, EventArgs e)
        {
            loginScreen id = new loginScreen();
        }
    }
}